public class ChangeElementValue {

    public static void transform(int[] arr, int n) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] *= n;
        }
    }

    public static void main(String[] args) {
        int[] arr = {2, 3, 5, 7, 3};
        transform(arr, 2);

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
